package com.hspedu.innerclass;

interface Bell{
 void ring();

}

public class InnerClassexer {
    public static void main(String[] args) {
        Cellphone cellphone = new Cellphone();
        cellphone.alarmclock(new Bell() {
            @Override
            public void ring() {
                System.out.println("懒猪起床了");
            }
        });
    }
}

class Cellphone{

    public void alarmclock(Bell bell){

        bell.ring();
    }

}